/*
 * @FileName: [ComboCardService.java]
 * 
 * @Package com.bcinfo.iccard.service
 * 
 * 
 * Copyright (c) 2011-2015 BCINFO Technology Limited Com.
 * All rights reserved.
 * 
 * This software is the confidential and proprietary
 * information of BCINFO Technology Limited Company
 * ("Confidential Information"). You shall not disclose
 * such Confidential Information and shall use it only
 * in accordance with the terms of the contract agreement
 * you entered into with RKY.
 * 
 * $Rev: 776 $
 * $LastChangedDate$
 * $LastChangedBy: huangb $
 * 
 * @category ICCARD
 * 
 * @version 1.1
 * 
 * @author $Author: huangb $
 * 
 * Change History:[Formatter: author date description] <br/>
 * 1
 * 2
 * 3
 */

package com.bcinfo.iccard.service;

import java.util.Date;
import java.util.List;

import com.bcinfo.iccard.exception.CardNumIsExistException;
import com.bcinfo.iccard.exception.ComboCardNameIsExistException;
import com.bcinfo.iccard.exception.IccardDatabaseException;
import com.bcinfo.iccard.exception.InvalidParametersException;
import com.bcinfo.iccard.model.CheckAccountLog;
import com.bcinfo.iccard.model.ComboCard;
import com.bcinfo.iccard.model.ComboCardCheckreason;
import com.bcinfo.iccard.model.ComboCardSaleDetail;
import com.bcinfo.iccard.model.Merchant;
import com.bcinfo.iccard.util.PaginationList;

/**
 * 充值卡服务 <br/>
 * <p>
 * Description:<br/>
 * <p>
 * TODO 详细描述
 * 
 * <p>
 * For Examples <br/>
 * 
 * <PRE>
 *      TODO 代码使用示例
 * </PRE>
 * <p>
 */
public interface ComboCardService
{

    /**
     * 
     * 新增套餐卡 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: huangb<br/>
     * <p>
     * Date: 2013-11-25-下午2:41:03<br/>
     * <p>
     * 
     * @param cardNum
     * @return
     * @throws IccardDatabaseException
     * @throws CardNumIsExistException
     * 
     */
    int add(ComboCard comboCard) throws IccardDatabaseException, ComboCardNameIsExistException;

    /**
     * 
     * 套餐卡记录查询<br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: huangb<br/>
     * <p>
     * Date: 2013-11-25-下午2:41:18<br/>
     * <p>
     * 
     * @param status
     * @param comboCardName
     * @param pageSize
     * @param pageNo
     * @return
     * @throws IccardDatabaseException
     * @throws InvalidParametersException
     * 
     */
    PaginationList<ComboCard> find(String comboCardName, int status, int pageSize, int pageNo)
            throws IccardDatabaseException, InvalidParametersException;

    /**
     * 
     * 删除套餐卡 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: huangb<br/>
     * <p>
     * Date: 2013-12-3-下午3:45:16<br/>
     * <p>
     * 
     * @param comboCardId
     * @param opId
     * @return
     * @throws IccardDatabaseException
     * 
     */
    int delete(long comboCardId) throws IccardDatabaseException;

    /**
     * 修改套餐卡信息 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: huangb<br/>
     * <p>
     * Date: 2013-12-3-下午6:03:05<br/>
     * <p>
     * 
     * @param comboCard
     * @return
     * @throws IccardDatabaseException
     * @throws InvalidParametersException
     * 
     */
    int update(ComboCard comboCard) throws IccardDatabaseException, InvalidParametersException;

    /**
     * 读取套餐卡信息 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: huangb<br/>
     * <p>
     * Date: 2013-12-4-上午9:32:12<br/>
     * <p>
     * 
     * @param comboCardId
     * @return
     * @throws IccardDatabaseException
     * 
     */
    ComboCard load(long comboCardId) throws IccardDatabaseException;

    /**
     * 
     * 查询所有商家 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: huangb<br/>
     * <p>
     * Date: 2013-12-6-上午10:16:49<br/>
     * <p>
     * 
     * @return
     * @throws IccardDatabaseException
     * 
     */
    List<Merchant> findAllMerchant() throws IccardDatabaseException;

    /**
     * 一句话描述 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: huangb<br/>
     * <p>
     * Date: 2013-12-6-下午5:33:21<br/>
     * <p>
     * 
     * @param merchantId
     * @return
     * @throws IccardDatabaseException
     * 
     */
    Merchant findMerchant(long merchantId) throws IccardDatabaseException;

    /**
     * 审核 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: huangb<br/>
     * <p>
     * Date: 2013-12-10-上午11:04:27<br/>
     * <p>
     * 
     * @param comboCardId
     * @param status
     * @param msg
     * @param opId
     * @return
     * @throws IccardDatabaseException
     * 
     */
    int audit(long comboCardId, int status, String msg, long opId) throws IccardDatabaseException;

    /**
     * 读取审核信息 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: huangb<br/>
     * <p>
     * Date: 2013-12-10-下午2:27:46<br/>
     * <p>
     * 
     * @param comboCardId
     * @return
     * @throws IccardDatabaseException
     * 
     */
    ComboCardCheckreason loadComboCardCheckreason(long comboCardId) throws IccardDatabaseException;

    /**
     * 套餐卡销售 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: huangb<br/>
     * <p>
     * Date: 2013-12-10-下午6:03:02<br/>
     * <p>
     * 
     * @param comboCardId
     * @param status
     * @param opId
     * @return
     * @throws IccardDatabaseException
     * 
     */
    ComboCardSaleDetail sale(long comboCardId,int status,long opId,String twoDimensionCode,String strQRCodePath) throws IccardDatabaseException;

    /**
     * 获取套餐卡销售明细信息 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: huangb<br/>
     * <p>
     * Date: 2013-12-11-下午3:13:01<br/>
     * <p>
     * 
     * @param comboCardSaleId
     * @return
     * @throws IccardDatabaseException
     * 
     */
    ComboCardSaleDetail loadComboCardSaleDetail(long comboCardSaleId) throws IccardDatabaseException;

    /**
     * 套餐二维码查询 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: tonic<br/>
     * <p>
     * Date: 2013-12-11-下午4:48:11<br/>
     * <p>
     * 
     * @param twoDimensionCode
     * @param pageSize
     * @param pageNo
     * @return
     * @throws IccardDatabaseException
     * @throws InvalidParametersException
     * 
     */
    PaginationList<ComboCardSaleDetail> findComboCardSaleDetails(String twoDimensionCode, int pageSize, int pageNo)
            throws IccardDatabaseException, InvalidParametersException;

    /**
     * 提取详情 <br/>
     * <p>
     * Description: TODO(详细描述) <br/>
     * <p>
     * Author: tonic<br/>
     * <p>
     * Date: 2013-12-11-下午5:42:12<br/>
     * <p>
     * 
     * @param comboCardId
     * @param status
     * @param pageSize
     * @param pageNo
     * @return
     * @throws IccardDatabaseException
     * @throws InvalidParametersException
     * 
     */
    PaginationList<ComboCardSaleDetail> findGetInfo(long comboCardId, int status, int pageSize, int pageNo)
            throws IccardDatabaseException, InvalidParametersException;

    /**
     * 取套餐列表。用于autocomplete选择器 <br/>
     * <p>
     * Description: 按套餐卡名称或描述取列表 <br/>
     * <p>
     * Author: arming<br/>
     * <p>
     * Date: 2013年12月12日-上午11:05:35<br/>
     * <p>
     * 
     * @param keyword
     *            关键词
     * @param maxRows
     *            最大数量
     * @return 套餐列表
     * 
     */
    List<ComboCard> findByNameCode(String keyword, int maxRows);

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2013-12-20-上午11:08:06<br/>
     * <p>
     * @param opId
     * @param pageSize
     * @param pageNo
     * @return
     * @throws IccardDatabaseException
     * @throws InvalidParametersException   
     * 
     */
    PaginationList<CheckAccountLog> findCheckAccount(long opId, int pageSize, int pageNo)
            throws IccardDatabaseException, InvalidParametersException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2013-12-20-下午5:17:16<br/>
     * <p>
     * @param saleUserId
     * @param opId
     * @return
     * @throws IccardDatabaseException   
     * 
     */
    int account(Date recentlyAccountDate,float accountMount,long saleUserId, long opId) throws IccardDatabaseException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2013-12-20-下午6:22:48<br/>
     * <p>
     * @param saleUserId
     * @param status
     * @param pageSize
     * @param pageNo
     * @return
     * @throws IccardDatabaseException
     * @throws InvalidParametersException   
     * 
     */
    PaginationList<ComboCardSaleDetail> findAccountInfo(long saleUserId, int status, int pageSize, int pageNo)
            throws IccardDatabaseException, InvalidParametersException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2013-12-23-下午2:18:48<br/>
     * <p>
     * @param saleUserId
     * @param status
     * @return
     * @throws IccardDatabaseException   
     * 
     */
    float findALLAccountBySaleUserId(long saleUserId, int status) throws IccardDatabaseException;

    /**
     * 一句话描述 <br/>
     * <p>Description: TODO(详细描述) 
     * <br/>
     * <p>Author: tonic<br/>
     * <p>Date: 2013-12-24-上午11:39:40<br/>
     * <p>
     * @param cardName
     * @return
     * @throws IccardDatabaseException   
     * 
     */
    int checkCardName(String cardName) throws IccardDatabaseException;

}
